Which Licensing Library to Use?

The following sections provide guidance for choosing the licensing library according to your deployment mode:

SCP-integrated Library—Available with SCL Add-on Package Only and Recommended For All Deployment Modes

Use the SCP-integrated library for supporting licensing as per all the deployment modes.

This library is available to SCL Add-on customers only.

Standalone Licensing Library—For Exclusively Supporting On-premises Standalone Licensing

Use the standalone licensing library for supporting licensing for standalone applications running without a network.

Standalone applications do not require a network to operate. Sentinel RMS provides licensing libraries that can be used in an exclusive standalone (also known as no-net environment).

In standalone environment, the licensing is self-contained on the individual computer where the licensed application is installed. The licensing library and license management functions become a part of the licensed application. The license file resides on the same computer as well. The most typical example is home-based users who install the application on their PCs. They are able to run the application, irrespective of whether the computer is connected to a network or not.

Network Licensing Library—For Exclusively Supporting On-premises Network Licensing

Use the network licensing library for supporting licensing for network applications. Such applications typically operate in enterprise-wide client/server environment. Sentinel RMS provides licensing libraries that can be used in network environment.

In the case of network licensing, the license management is performed outside the licensed application. An external License Manager is used to keep a track of licenses, authorize application usage, and manage licensing. The License Manager grants authorization to the requesting application after verifying the licensing conditions and denies the request when all the licenses are in use.

The License Manager can run on any computer on the network, including a computer on which the licensed application runs. The clients have the licensed application installed on their machines and the license file resides on the License Manager host. Network licensing is desirable in the cases of large and small enterprises, for centralized license management. By default, network applications use the broadcast mechanism to find active Sentinel RMS License Managers with available licenses.

NOTE   RMS does not support RMS License Managers with numeric host names. The License Manager may not start on such machines due to external dependencies.

Options (Other than Broadcast) to Find the License Manager in a Network

For faster results, you can allow use of the following options.

>Set the LSFORCEHOST environment variable
The LSFORCEHOST environment variable forces the application to look for only one License Manager computer. If the License Manager listed in the variable cannot be found, any API call from the client library which is trying to contact the License Manager fails. LSFORCEHOST overrides a LSHOST environment variable or LSHOST/lshost file, and prevents a network broadcast from being done. For example, to tell the licensed applications running on Windows to send license requests to a computer on the same subnetwork called SERVER1 and no other License Manager, use the following command:

  SET LSFORCEHOST=SERVER1

>Set the LSHOST environment variable (use the LSHOST file)
The LSHOST environment variable is used on a computer that is running the licensed application. It tells the application one or more License Manager computers to contact. When this variable is not set then the application will perform a broadcast for any License Manager that can authorize the application to run. When the variable is set, the application will send directed calls to the License Managers that are in the LSHOST list along with broadcast to the network. The application will traverse the list of responded License Managers beginning at the first License Manager in the list and moving down the list. The wait for License Manager response time when LSHOST is set is the same as the broadcast interval. In the LSHOST list, you must separate the License Manager host names with a tilde (~). A colon (:) was used earlier to separate License Manager host names. For example, use the following command:

  SET LSHOST=SERVER1~SERVER2

>Set the contact server using API Functions
To set the contact server, use the SNTL_ATTR_APPCONTEXT_CONTACT_SERVER attribute of the sntl_licensing_app_context_new API

The standalone applications protected using licensing API look for a license in the similar manner as explained above. In addition, you can use the sntl_licensing_configure (Unified) API function to force the path. However, the API has a higher priority than the LSERVRC environment variable.

NOTE   For network licensing, the external License Manager manages licensing of the application. Whereas, for standalone licensing, the License Manager is integrated with the Sentinel RMS client library and internally manages licensing. However, this difference between the standalone and network license management is not specifically stated in the documentation, unless required.

License Search Mechanisms Under Network Licensing

Broadcast Method to Locate License Managers

Under network licensing, applications use the broadcast mechanism to find active Sentinel RMS License Managers with available licenses. Under broadcast, the licensed application looks for a license first on the local computer, and then it on the License Managers in the subnet. See Locate the License Manager Computer for details.

The licensed applications use broadcast for locating a License Manager, if any of the following "Named License Manager Method" is not used.

Named License Manager Methods

For faster results, you can allow use of the following methods as they make a directed call to a specific License Manager:

>LSFORCEHOST environment variable
The LSFORCEHOST environment variable forces the application to look for only one License Manager computer. If the License Manager listed in LSFORCEHOST cannot be found, any API call from the licensing library which is trying to contact the License Manager fails. For example, to tell the licensed applications running on Windows to send license requests to a computer on the same subnet called SERVER1 and no other License Manager, use the following command:

  SET LSFORCEHOST=SERVER1

>LSHOST environment variable (use the LSHOST file)
The LSHOST environment variable is set on a computer that is running the licensed application. It tells the application one or more License Manager computers to contact. When LSHOST is set, the application will send directed calls to the License Managers that are in the LSHOST list along with broadcast to the network. The application will traverse the list of responded License Managers beginning at the first License Manager in the list and moving down the list. The wait for the License Manager response time when LSHOST is set is the same as the broadcast interval. In the LSHOST list, you must separate the License Manager host names with a tilde (~). A colon (:) was used earlier to separate License Manager host names. For example, use the following command:

  SET LSHOST=SERVER1~SERVER2

NOTE   LSFORCEHOST overrides the LSHOST environment variable or LSHOST/lshost file, and prevents a network broadcast from being done. When LSFORCEHOST or LSHOST is not set, then the application will perform a broadcast for any License Manager that can authorize the application to run.

>Set the contact server (License Manager Host) using Licensing API

To set a single contact server, use the SNTL_ATTR_APPCONTEXT_CONTACT_SERVER attribute of the Application Context API (for C, Java, or .NET).

To set a list of contact servers, use the SNTL_ATTR_APPCONTEXT_CONTACT_SERVER_LIST attribute of the Application Context API (for C, Java, or .NET).

TIP   The standalone applications look for a license in a similar manner as network applications. In addition, you can use the Configure API (for C, Java, or .NET)  to force the path. However, the Configure API has a higher priority than the LSERVRC environment variable.

Integrated Licensing Library—Recommended for Dynamic Switching Between On-premises Standalone and Network Licensing

Use integrated licensing library for allowing an application to switch between standalone and network licensing. This is known as dynamic switching.

At the time you license your application, you may not know whether it will be used in a standalone or network environment. You can license your application for either environment and the license model (standalone or network) can be decided when the application is run, rather than when the application is compiled.

Dynamic switching occurs when an application is licensed with the integrated library and it is not defined at that time whether the application will obtain a standalone license on the computer on which it is running (standalone mode) or from a License Manager (network mode). At the time the application is run, the decision is made based on the availability of a license, as follows:

>If LSHOST on the client computer is not set to anything, the application licensed with the integrated library will search first for a standalone license on that computer; if it is not found, the application will make a broadcast, looking for network License Managers for a license.

>If LSHOST is set to anything other than NO-NET, the application will send directed calls to the License Managers that are in the LSHOST list along with a broadcast to the network. If the appropriate License Manager is not found through these means, the application will look for a standalone license.

>If LSHOST is set to NO-NET, the application will first look for a standalone license; if it cannot find one, it will make a broadcast, looking for network License Managers for a license.

NOTE   You can use the LSFORCEHOST environment variable to force the application to look for a license on one specific computer. Or, to force the application to ONLY look for a standalone license, set LSFORCEHOST to NO-NET.

Examples of Dynamic Switching

If LSHOST is set to NO-NET followed by a list of computers containing License Managers:

SET LSHOST=NO-NET~SERVER1~SERVER2~SERVER3

If a standalone license is found, the application will use it. If a standalone license is not found, the application switches to searching the computers on the network named in the LSHOST environment, in the order listed, for a License Manager containing a network license that can be granted.

If LSHOST is set to a single computer name, the application will look for a network license from a License Manager on that computer plus the application sends a broadcast on the network. If an appropriate License Manager is not found on the network, the application switches to standalone mode and looks for a standalone license on the computer on which the application is running.

NOTE   Certain licenses are supported only by the integrated licensing library, namely commuter, repository, and grace licenses. If you are providing any of these features to your customers, be sure to use the integrated library.